import {
	http
} from '@/external/service/service.js'
import configService from '@/external/service/config.service.js';

export default class MineApi {
	/**
	 * 获取用户信息
	 * @param {Object} params
	 */
	async getUserInfo(params) {
		let res = await http.post('/yjd/v1/personal/getUserInfo', params)
		return res.data
	}

	/**
	 * 修改用户信息
	 * @param {Object} params
	 */
	async setUserInfo(params) {
		let res = await http.post('/yjd/v1/personal/setUserInfo', params)
		return res.data
	}

	/**
	 * 设置手机号
	 * @param {Object} params
	 */
	async setPhoneNumber(params) {
		let res = await http.post('/yjd/v1/personal/setPhoneNumber', params)
		return res.data
	}

	/**
	 * 实名认证
	 * @param {Object} params
	 */
	async realNameRegistration(params) {
		let res = await http.post('/yjd/v1/personal/realNameRegistration', params)
		return res.data
	}

	/**
	 * 设置邀请人
	 * @param {Object} params
	 */
	async setInviter(params) {
		let res = await http.post('/yjd/v1/personal/setInviter', params)
		return res.data
	}

	/**
	 * 身份验证
	 * @param {Object} params
	 */
	async identityAuthentication(params) {
		let res = await http.post('/yjd/v1/personal/identityAuthentication', params)
		return res.data
	}

	/**
	 * 修改密码
	 * @param {Object} params
	 */
	async personalChangePassword(params) {
		let res = await http.post('/yjd/v1/personal/personalChangePassword', params)
		return res.data
	}

	/**
	 * 退出登录
	 * @param {Object} params
	 */
	async signOut(params) {
		let res = await http.post('/yjd/v1/personal/signOut', params)
		return res.data
	}

	/**
	 * 用户反馈
	 * @param {Object} params
	 */
	async userFeedback(params) {
		let res = await http.post('/yjd/v1/personal/userFeedback', params)
		return res.data
	}


	/**
	 * 获取个人动态列表
	 * @param {Object} params
	 */
	async getPersonalDynamic(params) {
		let res = await http.post('/yjd/v1/personal/getPersonalDynamic', params)
		return res.data
	}

	/**
	 * 获取主页信息
	 * @param {Object} params
	 */
	async getPersonalHomepageInfo(params) {
		let res = await http.post('/yjd/v1/personal/getPersonalHomepageInfo', params)
		return res.data
	}

	/**
	 * 留言列表
	 */
	async messList(params) {
		let res = await http.post('', params)
		return res.data
	}


	// 设置支付密码(未做)
	async setPaymentPassword(params) {
		let res = await http.post('/yjd/v1/personal/setPaymentPassword', params)
		return res.data
	}
	// 充值列表
	async getRechargeList(params) {
		let res = await http.post('/yjd/v1/personal/getRechargeList', params)
		return res.data
	}
	// 充值福币(未做)
	async rechargeYb(params) {
		let res = await http.post('/yjd/v1/personal/rechargeYb', params)
		return res.data
	}
	// 购买祭品，并供奉(未做,支付密码)
	async buyOffering(params) {
		let res = await http.post('/yjd/v1/personal/buyOffering', params)
		return res.data
	}

	// 获取所有祭品
	async getAllOfferingList(params) {
		let res = await http.post('/yjd/v1/personal/getAllOfferingList', params)
		return res.data
	}
	// 获取积分兑换物品列表
	async getExchangedItemsList(params) {
		let res = await http.post('/yjd/v1/personal/getExchangedItemsList', params)
		return res.data
	}
	// 积分兑换物品
	async exchangedGoods(params) {
		let res = await http.post('/yjd/v1/personal/exchangedGoods', params)
		return res.data
	}
	
	//获取福币记录
	async getYbRecord(params) {
		let res = await http.post('/yjd/v1/personal/getYbRecord', params)
		return res.data
	}
	
	//邀请奖励
	async getInviteReward(params) {
		let res = await http.post('/yjd/v1/personal/getInviteReward', params)
		return res.data
	}
	
	//邀请记录
	async getInviteRecord(params) {
		let res = await http.post('/yjd/v1/personal/getInviteRecord', params)
		return res.data
	}
	
	
	//获取成长记录
	async getGrowthRecord(params) {
		let res = await http.post('/yjd/v1/personal/getGrowthRecord', params)
		return res.data
	}
	
	//获取积分记录/积分明细
	async getBonusRecord(params) {
		let res = await http.post('/yjd/v1/personal/getBonusRecord', params)
		return res.data
	}
	
	//获取抽签记录
	async getLotsRecord(params) {
		let res = await http.post('/yjd/v1/personal/getLotsRecord', params)
		return res.data
	}
}